import http from '@/utils/http.js';

export default {
    getQuestionInfo(params){
        return http.get('/question/info', {
            params
        });
    },
    listManageQuestion(params){
        return http.get('/manage/question/list/manage', {
            params
        });
    },


    listPoints: function (params) {
        return http.get('/point/list', {
            params
        });
    },
    questionUpdate(data){
        return http.post('/question/update',data)
    },
    pageQuestions(params) {
        return http.get('admin/question/pageOrderByTime', {
            params
        });
    },
    /*****后台观点相关*****/
    pagePoints(pointQueryDTO){
        console.log(pointQueryDTO)
        return http.post("/admin/point/page",pointQueryDTO)
    },
    pointUpdata(data) {
        return http.post('/admin/point/update',data)
    },
    pointApproveExamine(id){
        return http.get("/admin/point/approveExamine?id="+id)
    },
    pointFailedExamine(id){
        return http.get("/admin/point/failedExamine?id="+id)
    },
    /*****后台回答相关**** answer Answer */
    pageAnswers(answerQueryDTO){
        console.log(answerQueryDTO)
        return http.post("/admin/answer/page",answerQueryDTO)
    },
    answerUpdata(data) {
        return http.post('/admin/answer/update',data)
    },
    answerApproveExamine(id){
        return http.get("/admin/answer/approveExamine?id="+id)
    },
    answerFailedExamine(id){
        return http.get("/admin/answer/failedExamine?id="+id)
    },

    /*****后台回答评论相关*****/
    pageAnswerComment(answerCommentQueryDTO){
        console.log(answerCommentQueryDTO)
        return http.post("/admin/answerComment/page",answerCommentQueryDTO)
    },
    answerCommentUpdata(data) {
        return http.post('/admin/answerComment/update',data)
    },
    answerCommentApproveExamine(id){
        return http.get("/admin/answerComment/approveExamine?id="+id)
    },
    answerCommentFailedExamine(id){
        return http.get("/admin/answerComment/failedExamine?id="+id)
    }
}
